package com.ruoyi.company.service.impl;

import com.ruoyi.company.domain.MonthlyCardMsg;
import com.ruoyi.company.mapper.MonthlyCardMsgMapper;
import com.ruoyi.company.service.MonthlyCardMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class MonthlyCardMsgServiceImpl implements MonthlyCardMsgService {

    @Autowired
    private  MonthlyCardMsgMapper monthlyCardMsgMapper;

    @Override
    public Integer insertMonthlyCardMsg(MonthlyCardMsg monthlyCardMsg) {
        return monthlyCardMsgMapper.insertMonthlyCardMsg(monthlyCardMsg);
    }

    @Override
    public Integer updateMonthlyCardMsg(MonthlyCardMsg monthlyCardMsg) {
        monthlyCardMsg.setStatus("1");
        return monthlyCardMsgMapper.updateMonthlyCardMsg(monthlyCardMsg);
    }

    @Override
    public List<MonthlyCardMsg> list(MonthlyCardMsg monthlyCardMsg) {
        return monthlyCardMsgMapper.list(monthlyCardMsg);
    }

    @Override
    public Integer finish(Long id) {
        return monthlyCardMsgMapper.finish(id);
    }

    @Override
    public MonthlyCardMsg findMonthlyCardMsgByCompanyId(Long companyId) {
        return monthlyCardMsgMapper.findMonthlyCardMsgByCompanyId(companyId);
    }
}
